package com.gbiac.modules.monitor.entity;

import java.io.Serializable;
import java.io.UnsupportedEncodingException;
import java.util.Date;
import java.math.BigDecimal;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.jeecg.common.aspect.annotation.Dict;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * @Description: 席位人脸登录
 * @Author: jeecg-boot
 * @Date:   2024-12-03
 * @Version: V1.0
 */
@Data
@TableName("gbiac_seat_face_login")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="gbiac_seat_face_login对象", description="席位人脸登录")
public class SeatFaceLogin implements Serializable {
    private static final long serialVersionUID = 1L;

	/**ID*/
	@TableId(type = IdType.ASSIGN_ID)
    @ApiModelProperty(value = "ID")
    private String id;
	/**租户号*/
	@Excel(name = "租户号", width = 15)
    @ApiModelProperty(value = "租户号")
    private String tenantId;
	/**创建人*/
    @ApiModelProperty(value = "创建人")
    private String createBy;
	/**创建时间*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "创建时间")
    private Date createTime;
	/**更新人*/
    @ApiModelProperty(value = "更新人")
    private String updateBy;
	/**更新时间*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "更新时间")
    private Date updateTime;
	/**删除标识*/
	@Excel(name = "删除标识", width = 15)
    @ApiModelProperty(value = "删除标识")
    @TableLogic
    private Integer delFlag;
	/**所属部门编码*/
    @ApiModelProperty(value = "所属部门编码")
    private String sysOrgCode;
	/**席位id*/
	@Excel(name = "席位id", width = 15)
    @ApiModelProperty(value = "席位id")
    private String seatId;
	/**登录用户id*/
	@Excel(name = "登录用户id", width = 15)
    @ApiModelProperty(value = "登录用户id")
    @TableField(updateStrategy = FieldStrategy.ALWAYS)
    private String userId;
	/**登录时间*/
	@Excel(name = "登录时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "登录时间")
    @TableField(updateStrategy = FieldStrategy.ALWAYS)
    private Date loginTime;
	/**是否登录成功*/
	@Excel(name = "是否登录成功", width = 15)
    @ApiModelProperty(value = "是否登录成功")
    @TableField(updateStrategy = FieldStrategy.ALWAYS)
    private String loginSuccess;
	/**登录结果消息*/
	@Excel(name = "登录结果消息", width = 15)
    @ApiModelProperty(value = "登录结果消息")
    @TableField(updateStrategy = FieldStrategy.ALWAYS)
    private String loginResultMsg;

    public void loginSuccess(String userId) {
        this.loginSuccess = "1";
        this.userId = userId;
    }

    public void loginFailure(String loginFailureMsg) {
        this.loginSuccess = "0";
        this.loginResultMsg = loginFailureMsg;
    }
}
